//package com.zmn.plat.dubbo.impl.service;
//
//import java.util.List;
//
//import javax.annotation.Resource;
//
//import org.apache.dubbo.config.annotation.Service;
//
//import com.zmn.common.constant.GlobalConsts;
//import com.zmn.common.dto2.ResponseDTO;
//import com.zmn.manager.common.database.annotation.ReadOnlyConnection;
//import com.zmn.plat.business.interfaces.service.group.ServiceGroupBService;
//import com.zmn.plat.common.dto.service.group.ServiceGroupDIO;
//import com.zmn.plat.common.dto.service.group.ServiceGroupDRO;
//import com.zmn.plat.common.dto.service.item.ServiceItemDRO;
//import com.zmn.plat.common.exception.PlatException;
//import com.zmn.plat.dubbo.interfaces.service.ServiceGroupListRemoteService;
//import com.zmn.plat.dubbo.utils.DubboConsts;
//
//import lombok.extern.slf4j.Slf4j;
//
///**
// * @author tanbiao
// * @description
// * @since 2020/3/19 10:52
// * @modifier
// **/
//@Service(version = DubboConsts.INTERFACE_VERSION, validation = "true")
//@Slf4j
//public class ServiceGroupListRemoteServiceImpl implements ServiceGroupListRemoteService {
//    @Resource
//    ServiceGroupBService faultGroupBService;
//
//    @Override
//    @ReadOnlyConnection
//    public ResponseDTO<ServiceGroupDRO> getByKey(Integer groupId) {
//        log.info("getByKey 参数为：groupId={}", groupId);
//
//        try {
//            ServiceGroupDRO dro = faultGroupBService.getById(groupId);
//            return ResponseDTO.success(dro);
//        } catch (PlatException e) {
//            return ResponseDTO.fromErrorCodeTable(e.getErrorCode());
//        } catch (Exception e) {
//            log.error("getByKey error...", e);
//            return ResponseDTO.fail(GlobalConsts.FAILD_MSG);
//        }
//    }
//
//    @Override
//    @ReadOnlyConnection
//    public ResponseDTO<Boolean> checkFixPriceByChannelIdAndCityIdAndProvinceId(Integer channelId, Integer cityId, Integer provinceId) {
//        log.info("checkFixPriceByChannelIdAndCityIdAndProvinceId 参数为：channelId={},cityId={},provinceId={}", channelId, cityId, provinceId);
//
//        try {
//            Boolean reuslt = faultGroupBService.checkFixPriceByChannelIdAndCityIdAndProvinceId(channelId, cityId, provinceId);
//            return ResponseDTO.success(reuslt);
//        } catch (PlatException e) {
//            return ResponseDTO.fromErrorCodeTable(e.getErrorCode());
//        } catch (Exception e) {
//            log.error("checkFixPriceByChannelIdAndCityIdAndProvinceId error...", e);
//            return ResponseDTO.fail(GlobalConsts.FAILD_MSG);
//        }
//    }
//
//    @Override
//    @ReadOnlyConnection
//    public ResponseDTO<List<ServiceGroupDRO>> listByDIO(ServiceGroupDIO query) {
//        log.info("listByDIO 参数为：listByDIO={}", query);
//
//        try {
//            List<ServiceGroupDRO> list = faultGroupBService.listByDIO(query);
//            return ResponseDTO.success(list);
//        } catch (PlatException e) {
//            return ResponseDTO.fromErrorCodeTable(e.getErrorCode());
//        } catch (Exception e) {
//            log.error("listByDIO error...", e);
//            return ResponseDTO.fail(GlobalConsts.FAILD_MSG);
//        }
//    }
//
//    @Override
//    @ReadOnlyConnection
//    public ResponseDTO<List<ServiceItemDRO>> listByProductId(Integer productId) {
//        log.info("listByProductId 参数为：productId={}", productId);
//
//        try {
//            List<ServiceItemDRO> list = faultGroupBService.listByProductId(productId);
//            return ResponseDTO.success(list);
//        } catch (PlatException e) {
//            return ResponseDTO.fromErrorCodeTable(e.getErrorCode());
//        } catch (Exception e) {
//            log.error("listByProductId error...", e);
//            return ResponseDTO.fail(GlobalConsts.FAILD_MSG);
//        }
//    }
//}
